<!DOCTYPE html>
<html lang="zh-cn">
<head>
<title></title>
<meta name="renderer" content="webkit">
<meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta content="no-cache, no-store, must-revalidate" http-equiv="Cache-Control" />
<meta content="no-cache" http-equiv="Pragma" />
<meta content="0" http-equiv="Expires" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="stylesheet" href="/static/css/alivideo.css" />
<link href="template/css/animate.css" rel="stylesheet">
<link href="template/css/home.css" rel="stylesheet">
<script language="JavaScript" type="text/javascript" src="/static/js/kr/uhweb.js?v=2.0"></script>
<script language="JavaScript" type="text/javascript" src="/static/js/kr/polygonHotSpot.js"></script>
<script src="http://webapi.amap.com/maps?v=1.3&key=5994df74e871c57bd0752608bfc0069a&plugin=AMap.ToolBar"></script>
</head>
<body>
<script language="JavaScript" type="text/javascript" src="/tour/tour.js"></script>
<style>
    .marquee{
        position: absolute;
        overflow:hidden;
        height:34px;
        line-height:34px;
        width:100%;
        white-space:nowrap;
        z-index: 800;
        color:white;
        text-align: right;
        padding-right: 10px;
        letter-spacing: 1px;
        font-family: 黑体;
        font-size: 15px;
        background: rgba(0,0,0,.3);
        cursor: pointer;
    }
    .cp_btn_top_return{
        top:45px;
    }
    .marquee a{
        color:white;
    }
    .feature-wrapper>a{
        color:inherit;
    }
    .feature-wrapper>a>img {
        margin-bottom: 5px;
    }
    .btn_bgmusic,.btn_bgmusic_off{
        top:75px;
        outline:none;
        width:50px;
        height:50px;
    }
    .btn_bgmusic{
        background: url('/static/images/on_music.png') no-repeat;
        background-size:50% 50%;
    }
    .btn_bgmusic_off{
        background: url('/static/images/off_music.png') no-repeat;
        background-size:50% 50%;
    }
</style>
<div class="main">
    {if $notice}
    <div class="marquee">
        <a target="_blank" href="{if empty($notice.href)}javascript:void(0);{else}{$notice.href}{/if}">
        <marquee  direction="left" behavior="scroll" scrollamount="5" scrolldelay="0" loop="-1" hspace="0" vspace="0">{$notice.notice}</marquee>
    </a>
    </div>
    {/if}
	<button class="cp_btn_top_return container_1" onClick="more_img()">更多全景</button>
	<button class="cp_btn_top_return container_2 hidden" onClick="more_img_t()"><i class="icon-undo"></i> 返回首页</button>
    <div class="btn_bgmusic hide cp_btn_top_return" onClick="pause_bgMusic(this)" ></div>
<!--     <div class="btn_bgmusic" onClick="pause_bgMusic(this)"></div> -->
	<div id="pano" style="position:fixed;width:100%;height:100%;">
	</div>
	
<script>
    $(function(){
        plugins_init_function.push(bgmusic_init);
    })
    function bgmusic_init(data,settings){
         //背景音乐
        var musicObj = data.bg_music;
        if (musicObj.isWhole=='1') {
            if (musicObj.useMusic=='1') {
                $(".btn_bgmusic").removeClass('hide');
                settings["onstart"] += "playsound(bgmusic, '" + musicObj.mediaUrl + "', 0);";
            }
        } else {
            $(musicObj.sceneSettings).each(function (idx) {
                if (this.useMusic=='1') {
                    $(".btn_bgmusic").removeClass('hide');
                    settings['scene[scene_' + this.imgUuid + '].bgmusic'] = this.mediaUrl;
                }
            });
        }
       settings["events[skin_events].onloadcomplete"]+="js(toggleMusicBtn(get(xml.scene)));";
    }
    function toggleMusicBtn(sceneName) {
        var musicObj = $("body").data("panoData").bg_music;
        if (musicObj.isWhole=='1') {
            if (musicObj.useMusic=='1') {
                $('.btn_bgmusic,.btn_bgmusic_off').show();
            } else {
                $('.btn_bgmusic,.btn_bgmusic_off').hide();
            }
        } else {
            var imgUuid = sceneName.substring(sceneName.indexOf("_") + 1, sceneName.length).toLowerCase();
            $(musicObj.sceneSettings).each(function (idx) {
                if (imgUuid == this.imgUuid) {
                    if (this.useMusic=='1') {
                        $('.btn_bgmusic,.btn_bgmusic_off').show();
                    } else {
                        $('.btn_bgmusic,.btn_bgmusic_off').hide();
                    }
                }
            });
        }
    }
    function pause_bgMusic(el) {
        var krpano = document.getElementById('krpanoSWFObject');
        // krpano.call("pausesoundtoggle(bgmusic);pausesoundtoggle(bgm);");
        krpano.call("pausesoundtoggle(bgmusic);pausesoundtoggle(bgm);");
        toggleMusic(el);
    }
    function toggleMusic(el) {
        if ($(el).hasClass("btn_bgmusic")) {
            $(el).removeClass("btn_bgmusic");
            $(el).addClass("btn_bgmusic_off");
            $('.icon').removeClass('icon-check');
            $('.icon').addClass('icon-times');
        } else {
            $(el).removeClass("btn_bgmusic_off");
            $(el).addClass("btn_bgmusic");
            $('.icon').removeClass('icon-times');
            $('.icon').addClass('icon-check');
        }
    }
</script>
    <!--底部菜单 begin-->
    <div class="menu-bottom">
        <a href="tel:{$company_profile.phone}" class="menu-phone"><i class="icon icon-phone"></i>打电话</a>
        <span class="menu-navigate" onClick="javascript:window.open('http://uri.amap.com/marker?position={$company_profile.position}&name={$company_profile.name}')"><i class="icon icon-location-arrow"></i>去这里</span>
        <a href="javascript:void(0);" onClick="more_img()" class="menu-pano"><i class="icon icon-camera"></i>看全景</a>
        {if $company_profile.menu_status eq 0 and $company_profile.menu_name neq ""}
            <a href="#" class="menu-pano"><i class="icon icon-bars"></i>{$company_profile.menu_name}</a>
            <script>
                $(".menu-bottom >.menu-phone,.menu-navigate,.menu-navigate,.menu-pano").css("width","20%");
            </script>
            {/if}
    </div>

    <!--微信加好友弹出框 begin-->
    <div class="modal-qrcode">
        <div class="modal-mask"></div>
        <div class="modal-dialog">
            <div class="title">欢迎微信咨询
                <div class="close-icon"></div>
            </div>
            <div class="e-code">
                <img src="{$company_profile.contact_qrcode}"/>
            </div>
            <p>扫一扫或长按识别二维码<br>添加微信</p>
        </div>
    </div>

    <!--相册查看大图 begin-->
    <!--div class="img-main">
        <div class="close-btn"><img src="/company/template/images/icon-close-white@2x.png"/> </div>
        <div class="swiper-wrapper">
            <div class="slider">
				{foreach $thumbs as $k=>$v}
                <div class="slide" data-name="{$v.img_name}">
                    <div><img src="{$v.img_path}"/> </div>
                </div>
				{/foreach}
            </div>
        </div>
        <p class="text-con">
            <span class="num"><font class="cur_slide_num"></font>/{count($thumbs)}</span><br>
            <span class="name cur_slide_name"></span>
        </p>
    </div-->
	<!-- iSlider相册大图 -->
	<div id="iSlider-wrapper">
		<a class="close-islider" href="javascript:void(0);">
			<img style="width:20px;height:20px;" src="{$_lang.company_path}/template/images/icon-close-white@2x.png"/>
		</a>
	</div>
	
	<div id="scroll-card" class="scroll-card" style="z-index:2002">
		<div class="scroll-btn-card">
			<i class="icon icon-double-angle-up btn-card"></i>
		</div>

		<!--商家header begin-->
		<div class="basic-info">
			<p class="name-wrapper">
				<span class="name">{$company_profile.name}</span>
				<span class="status">早{$company_profile.open_start}点 - 晚{$company_profile.open_end}点</span>
                {if $company_profile.is_lowest eq 1}
				<span>{if $company_profile.lowest>0}{$company_profile.lowest}元起{else}无最低消费{/if}</span>
                {/if}
				{if $company_profile.is_book}
				<a class="reserve" href="{if $company_profile.book_href neq ""}{$company_profile.book_href}{else}/book/?cid={$company_profile.c_id}{/if}"><i class="icon icon-edit"></i>在线预订</a>
				{/if}
			</p>
			<p class="address-wrapper">
				<i class="icon icon-map-marker"></i>{$company_profile.address}
			</p>
		</div>

		<!--商定基本信息 begin-->
		<div class="feature-container">
			<div class="feature-row">
				{foreach $cats as $v}
                <div class="feature-wrapper">
                    <a href="{if $v.href}{$v.href}{else}/news/?cat_type={$v.id}{/if}">
                        <img src="{$v.icon}"/>
                        <span class="feature-name">{$v.name}</span>
                    </a>
                </div>
				{/foreach}
                {if $company_profile.comment_name neq ""}
                    <div class="feature-wrapper">
                        <a href="/comment/?cid={$company_profile.c_id}">
                            <img src="/data/company/comment_ico.png"/>
                            <span class="feature-name">{$company_profile.comment_name}</span>
                        </a>
                    </div>
                {/if}
                <div class="feature-more">更多</div>
            </div>
		</div>

        <!--商家联系  begin-->
        <div class="contact-wrapper">
            <div class="contact-con">
                <img src="{$company_profile.avatar}"/>
                <p class="person-name">{$company_profile.contact}</p>
                <p class="person-role">{$company_profile.contact_position}</p>
                <span><i class="icon icon-wechat"></i>加好友</span>
            </div>
        </div>

        <!--商家简介  begin-->
        <div class="farmhouse-info">
            <div class="info-con">
				{$company_profile.brief}
            </div>
        </div>
        <div class="load-more"><span>了解更多</span><i class="icon icon-angle-down"></i></div>

        <!--商家图片 begin-->
		{if count($thumbs)>0}
        <div class="picture-list">
            <div class="picture-con">
                <div class="j-nav">
					{foreach $thumbs as $k=>$v}
                    <span onClick="javascript:openSliderThumbs({$k});"><img src="{$v.img_path}" alt="{$v.img_name}"/> </span>
                    {/foreach}
                </div>
            </div>
            <span class="pic-num">共有{count($thumbs)}张图片</span>
        </div>
		{/if}
		
		<!-- iSlider相册大图程序 -->
		{if count($thumbs)>0}
		<style>
			#iSlider-wrapper {
				position: fixed;
				width: 100%;
				max-width: 640px;
				height: 100%;
				top: 0;
				left: 0;
				right: 0;
				margin:0 auto;
				background: #1a1a1a;
				z-index: 11223;
				overflow: hidden;
			}
			
			#iSlider-wrapper ul {
				position: relative;
				margin: 0;
				padding: 0;
				list-style: none;
				height: 100%;
				overflow: hidden;
			}
	
			#iSlider-wrapper li {
				width: 100%;
				position: absolute;
				margin: 0;
				padding: 0;
				height: 100%;
				overflow: hidden;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-box-pack: center;
				-webkit-box-align: center;
				list-style: none;
			}
			
			#iSlider-wrapper .close-islider{
				position:absolute;right:20px;top:20px;z-index:11224;
			}
			#iSlider-wrapper .serail-number{
				position:absolute;left:20px;bottom:50px;color:#fff;
			}
			#iSlider-wrapper .serail-name{
				position:absolute;bottom:20px;left:20px;color:#fff;font-size:16px;
			}	
		</style>	
		<script type="text/javascript" src="{$_lang.company_path}/static/islider/iSlider.min.js"></script>
		<script type="text/javascript" src="{$_lang.company_path}/static/islider/iSlider.animate.min.js"></script>
		<script type="text/javascript" src="{$_lang.company_path}/static/islider/iSlider.plugin.zoompic.min.js"></script>  
		<script type="text/javascript">
		var iSlider_thumbs;
		var iSlider_thumbs_list = [];
		{foreach $thumbs as $k=>$v}
			var	img = {
					  'content':'<img src="{$v.img_path}">'+
								 '<div class="serail-number">{$k+1}/{count($thumbs)}</div>'+
								 '<div class="serail-name">{$v.img_name}</div>',
					  };
			iSlider_thumbs_list.push(img);
		{/foreach}
		/**
		 * 查看相册大图
		 * @param cur_index：当前图片的索引，从0开始  
		**/
		function openSliderThumbs(cur_index){
			//已实例化iSlider，直接打开
			if(typeof(iSlider_thumbs)!='undefined'){
				iSlider_thumbs.loadData(iSlider_thumbs_list,cur_index);
				$("#iSlider-wrapper").show();
				return;
			}
			var opts = {
				data: iSlider_thumbs_list,
				type: 'dom',
				dom: document.getElementById("iSlider-wrapper"),
				duration: 1000,
				initIndex: cur_index,
				plugins: ['zoompic']
			};
			iSlider_thumbs = new iSlider(opts);
			if(cur_index<1){
				$("#iSlider-wrapper").hide();
			}
		}
		openSliderThumbs(0);
		</script>
		{/if}
		
        <!--新闻列表 begin-->
        <div class="news-list">
			{foreach $news as $k=>$v}
            <a target="_blank" href="/news/?nid={$v.id}">
                <img src="{$v.pic}"/>
                <div class="pic-mask"></div>
                <p class="title">{$v.title}</p>
                <p class="bottom">
                    <span class="time">{date('Y-m-d',strtotime($v.create_time))}</span>
                    <span class="more">查看全文>></span>
                </p>
            </a>
			{/foreach}
        </div>

        <!--地图 begin-->
        <div class="scene">
            <div class="title">附近</div>
            <div class="map-con" id="amap_container"></div>
			{foreach $nearby as $k=>$v}
            <div class="scene-item {if $k==0}active{/if}" data-lnglat="{$v.position}">
                <span class="name">{$v.name}</span>
                <span class="distance">
                    <span class="num">{$v.distance}</span>
                    <span class="km">km</span>
                </span>
                <span class="navigate" onClick="javascript:window.open('http://uri.amap.com/marker?position={$v.position}&name={$v.name}')">导航</span>
            </div>
			{/foreach}
        </div>
		<script type="text/javascript">
			//实例化地图
            var position = '{$company_profile.position}';
            var position_arr = position.split(",");
            var map = new AMap.Map('amap_container', {
                resizeEnable: false,
                raiseOnDrag: false,
                zoomEnable:false,
                dragEnable: false,
                center: [position_arr[0],position_arr[1]],//自己的位置
                zoom: 13
            });

			var marker = new AMap.Marker({
				map: map,
				position: [position_arr[0],position_arr[1]],
			});
		</script>
		
		<!-- 签到 begin-->
		<div class="share-container" style="text-align:center">
			<button class="sign-in-button" onClick="javascript:wx_signin();" style="background-image:url({$_lang.company_path}/template/images/icon-signin.png)">签到</button>
			<div class="signin-tit">共<font id="signin-count">0</font>位用户签到</div>
			<div class="signin-avatar-container" style="display:none">
				<div class="signin-avatar" id="signin-avatar"></div>
			</div>
			<div style="clear:both"></div>
		</div>
		
		<!-- 点赞、踩一脚 begin-->
		<div class="share-container">
			<div class="signin-container">
				<button class="sign-in-button" onClick="javascript:wx_like(1);" style="background-image:url({$_lang.company_path}/template/images/icon-zan.png)">赞（<font id="like_count">0</font>）</button>
			</div>
			<div class="signin-container">
				<button class="sign-in-button" onClick="javascript:wx_unlike(1);" style="float:right;background-image:url({$_lang.company_path}/template/images/icon-footer.png)">踩一脚（<font id="unlike_count">0</font>）</button>
			</div>
		</div>	
		
		<!--分享 begin-->
		<div class="share-container">
				<button type="button" class="share-button" onClick="javascript:share_weixin(true);">
					<em></em>分享给好友
				</button>
				<div class="share-data-container">
					<div class="share-data-wrapper">分享<font id="share_num">{$company_profile.share_num}</font></div> 
					<div class="view-data-wrapper">查看<font id="view_num">{$company_profile.view_num}</font></div>
				</div>	
			</div>

		
		<div style="height:55px"></div>
		
	</div>

</div>


<!--提示框 方式2 begin-->
<div class="prompt_mode1 hidden">
	<p></p>
	<span onClick="javascript:util_close_dialog2();">确定</span>
</div>
<div class="mode1_fg hidden"></div>

<!-- 微信分享包含文件 -->
{include file="lib/share_wx.lbi"}

<!-- ZUI Javascript组件 -->
<script language="JavaScript" type="text/javascript" src="/static/js/kr/vrshow.js?v=0918"></script>
<script src="template/js/wx_prevent_scroll.js"></script>
<script src="template/js/redefine_touch.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript" src="/static/js/kr/jssdk.js"></script>
<script type="text/javascript" src="/static/js/alivideo.js"></script>
<script type="text/javascript">
	//组装分享的参数
	var _title = '{$company_profile.name} - 企业名片，360全景，一键导航，在线预订';
	var _content = '{mb_substr($company_profile.brief_share,0,100)}';
	var _imgUrl = '{$_lang.host}{$company_profile.avatar}';
	//商家id
	var company_id = '{$company_profile.c_id}';
	//项目根路径
	var company_path = '{$_lang.company_path}';
	//赋值js变量
	var view_uuid = '{$company_profile.pano_uuid}';
	var startscene = '{$company_profile.pano_scene}';
	var global_scenechoose = '0';
	var scrollTop;
    var type = '{$type}';
    //向上移动
    function tc(){
        var hth=$(window).height()-230+'px';
        $('.scroll-card').addClass('status-top').removeClass('status-bottom');
        $('.scroll-card').css({
        	'transform':'translateY('+hth+')','opacity':'1','margin':'0 10px','height':'230px','padding':'0'
        });

        $('.btn-card').removeClass('icon-double-angle-down').addClass('icon-double-angle-up');

        $('.main').css('position','fixed');
    }

    function tt(){
        $('.scroll-card').addClass('status-bottom').removeClass('status-top');

        $('.scroll-card').css({
        	'transform':'translateY(0px)','margin':'0px','height':'auto','padding':'0 10px'
        });
        H = $('.scroll-card').outerHeight(true);
        $('.scroll-card').css({
        	'height':''+H+'px'
        });
        $('.btn-card').removeClass('icon-double-angle-up').addClass('icon-double-angle-down');

        $('.main').css('position','relative');
    }

    $(function(){

        var fww=$('.feature-wrapper').width();

        //特征图标大小设置
        $('.feature-wrapper>a>img').css({
            'width':fww*0.4+'px','height':fww*0.4+'px'
        });

        //特征更多按钮
        var fwh=$('.feature-wrapper').height();
        $('.feature-more').css({
            'width':fww,'height':fwh+'px','line-height':fwh+'px'
        });

        if($('.feature-wrapper').length>8){
			//特征的高度变化
        	$('.feature-row').css('height',fwh*2+47+'px');
            $('.feature-more').css('display','block');
        }else{
            $('.feature-more').css('display','none');
        }
        $('.feature-more').bind('click',function(){
            if($('.feature-more').html()=='更多'){
                $('.feature-row').css('height','auto');
                $('.feature-more').html('关闭');
            }else{
                $('.feature-row').css('height',fwh*2+47+'px');
                $('.feature-more').html('更多');
            }

        });



        //新闻列表高度
        var naw=$('.news-list>a').width();
        $('.news-list>a>img').css({
            'width':naw+'px','height':naw*0.5+'px'
        });

        //地图高度
        $('.map-con').css('height',$('.map-con').width()*0.5+'px');

        //路线导航选择
        $('.scene>.scene-item').bind('click',function(){
            $(this).addClass('active').siblings().removeClass('active');
        });



        //微信添加好友弹出框
        wx_add();

        //弹出框的出现显示
        $('.close-icon').bind('click',function(){
            $('.modal-qrcode').css('display','none');
        });
        $('.contact-con>span').bind('click',function(){
            $('.modal-qrcode').css('display','block');
            wx_add();
        });

        //查看图片关闭按钮
		$('.close-islider').on('click',function(){
			$('#iSlider-wrapper').hide();
		});

        //新闻详情页关闭
        $('.new-detail>i,.new-detail>.back-go').on('click',function(){
            $('.new-detail').css('display','none');
        });

        //商户介绍显示更多
        $('.load-more>span').bind('click',function(){
            var fih= $('.farmhouse-info>.info-con').height();
            if($('.load-more>i').is('.icon-angle-down')){
                $('.farmhouse-info').css('max-height',fih+20+'px');
                $('.load-more>span').html('收起');
                $('.load-more>i').addClass('icon-angle-up').removeClass('icon-angle-down');
            }else{
                $('.farmhouse-info').css('max-height','140px');
                $('.load-more>span').html('了解更多');
                $('.load-more>i').addClass('icon-angle-down').removeClass('icon-angle-up');
            }
        });

        //加载前将模块定位到底部
        var htheight=$(window).height()+'px';
        $('.scroll-card').css({
        	'transform':'translateY('+htheight+')','height':'230px','opacity':'0'
        });

        setTimeout(tc,10);

        //鼠标滚动效果
        $('.scroll-card').on("mousewheel DOMMouseScroll", function (e) {
            var delta = (e.originalEvent.wheelDelta && (e.originalEvent.wheelDelta > 0 ? 1 : -1)) ||  // chrome & ie
                    (e.originalEvent.detail && (e.originalEvent.detail > 0 ? -1 : 1));              // firefox

            if (delta > 0) {
                // 向上滚
                $(window).scroll(function(){
                　　scrollTop = $(this).scrollTop();
                });
                if(scrollTop<=0){
                    tc();
                }
            } else if (delta < 0) {
                // 向下滚
                tt();
            }

            mbottom();
        });

        //点击滑动效果
        $('.btn-card').click(function(){
            if($('.btn-card').is('.icon-double-angle-up')){
                tt();
                $('.btn-card').removeClass('icon-double-angle-up').addClass('icon-double-angle-down');
            }else{
                tc();
                $('.btn-card').removeClass('icon-double-angle-down').addClass('icon-double-angle-up');
            }

            mbottom();
        });
		
		//获取访问量
		$.post(company_path+"/ajax.php",{literal}{act:'view_num',c_id:company_id}{/literal},function(data){
			if(data.status==1){
				$('#view_num').html(data.view_num);
			}
		},'JSON');
			
		//微信分享
		set_jssdk_params(true);
		
		//微信签到列表
		wx_signin_list();
		
		//微信点赞
		wx_like();
		
		//微信踩一脚
		wx_unlike();
    });

    var touch = true;//开启触摸
    if(touch){
        k_touch();
    }

    //触摸滑动模块
    function k_touch() {
        var _start = 0, _end = 0, _content = document.getElementById("scroll-card");
        _content.addEventListener("touchstart", touchStart, false);
        _content.addEventListener("touchmove", touchMove, false);
        _content.addEventListener("touchend", touchEnd, false);
        function touchStart(event) {
            var touch = event.targetTouches[0];
            _start = touch.pageY;
        }
        function touchMove(event) {
            var touch = event.targetTouches[0];
            _end = (_start - touch.pageY);
        }

        function touchEnd(event) {
            if (_end < -100) {
                tc();
                _end=0;
            }else if(_end > 100){
                tt();
                _end=0;
            }
            mbottom();
        }

    }

    //显示隐藏项目上的其他信息
    function more_img(){
		$('.menu-bottom').css('bottom','-55px');
        $('.container_1,#scroll-card').addClass('hidden');
        $('.container_2').removeClass('hidden');
        var krpano = document.getElementById('krpanoSWFObject');
        krpano.call("skin_showthumbs(true);");
    }

    function more_img_t(){
        $('.container_1,#scroll-card').removeClass('hidden');
        $('.container_2').addClass('hidden');
        var krpano = document.getElementById('krpanoSWFObject');
        krpano.call("skin_showthumbs(false);");
    }


    //微信添加好友弹出框
    function wx_add(){
        //宽度选择
        var mdw= $('.modal-dialog').width();
        $('.modal-dialog').css({
            'height':mdw*1.5+'px','margin-top':-mdw*1.5/2+'px'
        });

        //二维码宽度
        $('.e-code').css('height',mdw*0.8+'px');
        $('.e-code>img').css({
            'height':mdw*0.8+'px','width':mdw*0.8+'px'
        });
    }


    //底部出现隐藏
    function mbottom(){
        if($('.scroll-card').is('.status-top')){
            $('.menu-bottom').css('bottom','-55px');
        }else{
            $('.menu-bottom').css('bottom','0px');
        }
    }
	
	//公用弹出提示信息，.prompt_mode1
	//@param message:提示信息
	function util_alert_dialog2(message){
		$('.prompt_mode1 p').html(message);
		$('.prompt_mode1').removeClass('hidden');
		$('.mode1_fg').removeClass('hidden');
		//弹出框方式2的宽度、高度定位
		//var pmwidth1=$('.prompt_mode1').width()+40;
		var pmheight1=$('.prompt_mode1').height()+40;
		$('.prompt_mode1').css({
			'margin-top': -pmheight1/2+'px'//,'margin-left':-pmwidth1/2+'px'
		});	
	}
	
	//公用关闭提示信息，.prompt_mode2
	function util_close_dialog2(){
		$('.prompt_mode1').addClass('hidden');
		$('.mode1_fg').addClass('hidden');
	}
	
	//分享成功回调方法
	function share_success_callback(){
		$.post(company_path+"/ajax.php",{literal}{act:'share_wx',c_id:company_id}{/literal},function(data){
			if(data.status==1){
				var pre_share_num = parseInt($('#share_num').text());
				$('#share_num').html(parseInt(pre_share_num+1));
			}
		},'JSON');
	}
	
	//微信签到
	function wx_signin(){
		//是否已微信登录
		$.post(company_path+"/weixin.php",{literal}{act:'login',step:'check'}{/literal},function(data){
			//已登录
			if(data.ret==1){
				$.post(company_path+"/ajax.php",{literal}{act:'wx_signin',c_id:company_id}{/literal},function(data){
					if(data.status==1){
						//提取签到列表
						wx_signin_list();
					}
					//24小时内只能签到1次
					else{
						util_alert_dialog2(data.msg);
					}
				},'JSON');
			}
			else{
				window.location.href = company_path+"/weixin.php?act=login&cid="+company_id;
			}
		},'JSON');
	}
	
	//提取微信签到列表
	function wx_signin_list(){
		$.post(company_path+"/ajax.php",{literal}{act:'wx_signin_list',c_id:company_id}{/literal},function(data){
			var html = '';
			for(var i=0;i<data.res.length;i++){
				html += '<img src="'+data.res[i].head_img+'">';
			}
			$('#signin-count').html(data.count);
			if(data.count>0){
				$('#signin-avatar').html(html);
				$('.signin-avatar-container').show();
			}
		},'JSON');
	}
	
	//点赞
	//@param pressed:是否点击执行
	function wx_like(pressed){
		$.post(company_path+'/ajax.php',{literal}{act:'wx_like',c_id:company_id,pressed:pressed}{/literal},function(data){
			if(data.status==1){
				$('#like_count').html(data.msg);
			}
			else{
				util_alert_dialog2(data.msg);
			}
		},'JSON');
	}
	
	//踩一脚
	//param pressed:是否点击执行
	function wx_unlike(pressed){
		$.post(company_path+'/ajax.php',{literal}{act:'wx_unlike',c_id:company_id,pressed:pressed}{/literal},function(data){
			if(data.status==1){
				$('#unlike_count').html(data.msg);
			}
			else{
				util_alert_dialog2(data.msg);
			}
		},'JSON');
	}

</script>
</body>
</html>